package ru.niir.goodfil.audit.domain;

import ru.niir.goodfil.audit.domain.enums.EnviromentSubsystem;
import ru.niir.goodfil.audit.domain.enums.IntegrityEvent;

import javax.persistence.Entity;
import javax.persistence.EnumType;
import javax.persistence.Enumerated;

@Entity
public class EnviromentIntegrityEvent extends Event {
    @Enumerated(value = EnumType.STRING)
    private EnviromentSubsystem subsystem;

    @Enumerated(value = EnumType.STRING)
    private IntegrityEvent event;

    private EnviromentIntegrityEvent() {
    }

    public EnviromentIntegrityEvent(EnviromentSubsystem subsystem, IntegrityEvent event) {
        this.subsystem = subsystem;
        this.event = event;
    }

    public EnviromentSubsystem getSubsystem() {
        return subsystem;
    }

    public void setSubsystem(EnviromentSubsystem subsystem) {
        this.subsystem = subsystem;
    }

    public IntegrityEvent getEvent() {
        return event;
    }

    public void setEvent(IntegrityEvent event) {
        this.event = event;
    }

    @Override
    public String toString() {
        return "EnviromentIntegrityEvent{" +
                "subsystem=" + subsystem +
                ", event=" + event +
                '}';
    }
}
